﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Extensions.DependencyInjection;
using SmartSiteManagementSystem.IServices;
using SmartSiteManagementSystem.IRepository.Admin;
using SmartSiteManagementSystem.Repository.Admin;
using SmartSiteManagementSystem.Models.Admin;
using SmartSiteManagementSystem.IRepository.Material;
using SmartSiteManagementSystem.Repository.Material;
using SmartSiteManagementSystem.Models.Material;
using SmartSiteManagementSystem.IRepository.User;
using SmartSiteManagementSystem.Repository.User;
using SmartSiteManagementSystem.Models.User;

using SmartSiteManagementSystem.IRepository.WorkTask;
using SmartSiteManagementSystem.Repository.WorkTask;
using SmartSiteManagementSystem.Models.WorkTask;

using SmartSiteManagementSystem.IRepository.ProjectManage;
using SmartSiteManagementSystem.Repository.ProjectManage;
using SmartSiteManagementSystem.Models.ProjectManage;




using SmartSiteManagementSystem.IRepository.Equipment;
using SmartSiteManagementSystem.Repository.Equipment;
using SmartSiteManagementSystem.Models.Equipment;

namespace SmartSiteManagementSystem.Services.DendencyInject
{
    /// <summary>
    /// 依赖注入类
    /// </summary>
    public static class SmartSiteManagementSysDendencyInjectExtension
    {
        public static void addSystemService(this IServiceCollection services)
        {
            #region AdminService
            services.AddScoped<IAdminUserInfoRepository, AdminUserInfoRepository>();
            services.AddScoped<IAdminMenuInfoRepository, AdminMenuInfoRepository>();
            services.AddScoped<IAdminGroupInfoRepository, AdminGroupInfoRepository>();
            services.AddScoped<IAdminGroupBtnRelInfoRepository, AdminGroupBtnRelInfoRepository>();
            services.AddScoped<IAdminUserGroupMenuInfoRepository, AdminUserGroupMenuInfoRepository>();
            services.AddScoped<IAdminPageBtnInfoRepository, AdminPageBtnInfoRepository>();
            services.AddScoped<IAdminUserGroupRelationInfoRepository,AdminUserGroupRelationRepository>();
            services.AddScoped<IAdminService, AdminService>();
            #endregion
            #region MaterialService
            services.AddScoped<IMaterialInfoRepository, MaterialInfoRepository>();
            services.AddScoped<IMaterialCatalogInfoRepository, MaterialCatalogInfoRepository>();
            services.AddScoped<IMaterialService, MaterialService>();
            #endregion

            #region UserService
            services.AddScoped<IUserHealthMonitorInfoRepository, UserHealthMonitorInfoRepository>();

            services.AddScoped<IUserInfoRepository, UserInfoRepository>();
            services.AddScoped<IUserService, UserService>();

            #endregion


            #region WorkTaskService
            services.AddScoped<ISupplyingPlaceInfoRepository, SupplyingPlaceInfoRepository>();

            services.AddScoped<ISupplyingPlaceMaterialInfoRepository, SupplyingPlaceMaterialInfoRepository>();
            services.AddScoped<IDemandingPlaceInfoRepository, DemandingPlaceInfoRepository>();


            services.AddScoped<ITaskSetInfoRepository, TaskSetInfoRepository>();
            services.AddScoped<ITaskInfoRepository, TaskInfoRepository>();

            services.AddScoped<IWorkTaskService, WorkTaskService>();
            #endregion


            #region EquipmentService
            services.AddScoped<ITowerCraneInfoRepository, TowerCraneInfoRepository>();
            services.AddScoped<IEquipmentService, EquipmentService>();
            #endregion


            #region ProjectManageService
            services.AddScoped<IDayProjectInfoRepository, DayProjectInfoRepository>();
            services.AddScoped<IProjectInfoRepository, ProjectInfoRepository>();
            services.AddScoped<IDayProjectTypeInfoRepository, DayProjectTypeInfoRepository>();
            services.AddScoped<IProjectManageService, ProjectManageService>();
            #endregion
        }

    }
}
